#include <zlib/lib/Ink_time.h>
#include <iostream>

using namespace std;

int main()
{
	int a = 10;
	ink_hrtime time1 = ink_hrtime_from_hource(a);
	ink_hrtime time2 = ink_hrtime_from_minute(a);
	ink_hrtime time3 = ink_hrtime_from_second(a);
	ink_hrtime time4 = ink_hrtime_from_msecond(a);
	ink_hrtime time5 = ink_hrtime_from_usecond(a);
	ink_hrtime time6 = ink_hrtime_from_nsecond(a);

	cout << time1 << endl;	
	cout << time2 << endl;	
	cout << time3 << endl;	
	cout << time4 << endl;	
	cout << time5 << endl;	
	cout << time6 << endl;	

	ink_hrtime time11 = ink_hrtime_to_hource(time1);
	ink_hrtime time22 = ink_hrtime_to_minute(time2);
	ink_hrtime time33 = ink_hrtime_to_second(time3);
	ink_hrtime time44 = ink_hrtime_to_msecond(time4);
	ink_hrtime time55 = ink_hrtime_to_usecond(time5);
	ink_hrtime time66 = ink_hrtime_to_nsecond(time6);

	cout << time11 << endl;
	cout << time22 << endl;
	cout << time33 << endl;
	cout << time44 << endl;
	cout << time55 << endl;
	cout << time66 << endl;

	cout << "-----------------------------------" << endl;

	ink_hrtime second = ink_time_second();
	ink_hrtime msecond = ink_time_msecond();
	ink_hrtime usecond = ink_time_usecond();

	cout << second << endl;
	cout << msecond << endl;
	cout << usecond << endl;

	ink_hrtime nsecond = ink_hrtime_from_usecond(usecond);
	cout << nsecond << endl;
	cout << "---------------------------------------------------" << endl;
	struct timespec ts = ink_hrtime_to_timespec(nsecond);
	cout << ink_hrtime_from_timespec(&ts) << endl;

	struct timeval tv = ink_hrtime_to_timeval(nsecond);
	cout << ink_hrtime_from_timeval(&tv) << endl;

	cout << ink_time_nsecond() << endl;

}


